
using System;
using System.Linq;
using Csla;
using Csla.Data;
using Csla.Security;
using Csla.Validation;

namespace HousingInfo.Library
{ 
	public partial class ProjectBO : Csla.BusinessBase<ProjectBO>
	{

		#region Authorization Rules
		protected override void AddAuthorizationRules()
		{
			//TODO: Define authorization rules in ProjectBO
			//AuthorizationRules.AllowRead(ProjectIDProperty, "ProjectBOReadGroup");
			//AuthorizationRules.AllowRead(NameProperty, "ProjectBOReadGroup");
			//AuthorizationRules.AllowRead(CategoryIDProperty, "ProjectBOReadGroup");
			//AuthorizationRules.AllowRead(DescriptionProperty, "ProjectBOReadGroup");
			//AuthorizationRules.AllowRead(CreatedDateProperty, "ProjectBOReadGroup");
			//AuthorizationRules.AllowRead(AddressProperty, "ProjectBOReadGroup");
			//AuthorizationRules.AllowRead(SureProperty, "ProjectBOReadGroup");
			//AuthorizationRules.AllowRead(NumberFloorProperty, "ProjectBOReadGroup");
			//AuthorizationRules.AllowRead(InvestorsProperty, "ProjectBOReadGroup");
			//AuthorizationRules.AllowRead(ConstructionProperty, "ProjectBOReadGroup");
			//AuthorizationRules.AllowRead(DesignProperty, "ProjectBOReadGroup");
			//AuthorizationRules.AllowRead(ScaleProperty, "ProjectBOReadGroup");
			//AuthorizationRules.AllowRead(ContentProperty, "ProjectBOReadGroup");

			//AuthorizationRules.AllowWrite(NameProperty, "ProjectBOWriteGroup");
			//AuthorizationRules.AllowWrite(CategoryIDProperty, "ProjectBOWriteGroup");
			//AuthorizationRules.AllowWrite(DescriptionProperty, "ProjectBOWriteGroup");
			//AuthorizationRules.AllowWrite(CreatedDateProperty, "ProjectBOWriteGroup");
			//AuthorizationRules.AllowWrite(AddressProperty, "ProjectBOWriteGroup");
			//AuthorizationRules.AllowWrite(SureProperty, "ProjectBOWriteGroup");
			//AuthorizationRules.AllowWrite(NumberFloorProperty, "ProjectBOWriteGroup");
			//AuthorizationRules.AllowWrite(InvestorsProperty, "ProjectBOWriteGroup");
			//AuthorizationRules.AllowWrite(ConstructionProperty, "ProjectBOWriteGroup");
			//AuthorizationRules.AllowWrite(DesignProperty, "ProjectBOWriteGroup");
			//AuthorizationRules.AllowWrite(ScaleProperty, "ProjectBOWriteGroup");
			//AuthorizationRules.AllowWrite(ContentProperty, "ProjectBOWriteGroup");
		}

		protected static void AddObjectAuthorizationRules()
		{
			//TODO: Define object-level authorization rules of ProjectBO
			//AuthorizationRules.AllowCreate(typeof(ProjectBO), "ProjectBOCreateGroup"));
			//AuthorizationRules.AllowEdit(typeof(ProjectBO), "ProjectBOEditGroup"));
			//AuthorizationRules.AllowDelete(typeof(ProjectBO), "ProjectBODeleteGroup"));
		}
		#endregion //Authorization Rules
		private void AssignParentKey(HousingInfo.DataLinQ.Project data)
		{
			//CHANGE_ME! //data.ParentId = ReadProperty<ParentBO>(ParentBOProperty).Id;
		}

	}
}
